#include<iostream>
#include <tchar.h>
#include <windows.h>
using namespace std;

class Farther
{
public:
	virtual void Func()
	{
		TCHAR t_szMess[200];
		_stprintf(t_szMess,TEXT("Farther\n"));
		OutputDebugString(t_szMess);
	}
};
class Son:public Farther
{
public:
	void Func()
	{
		TCHAR t_szMess[200];
		_stprintf(t_szMess,TEXT("Son\n"));
		OutputDebugString(t_szMess);
	}
	void Func2()
	{
		TCHAR t_szMess[200];
		_stprintf(t_szMess,TEXT("Son_Func2\n"));
		OutputDebugString(t_szMess);		
	}
};
int main()
{
	Farther* t_pFarther = new Son();
	t_pFarther->Func();
	dynamic_cast<Son*>(t_pFarther)->Func2();
	Son* t_Son = dynamic_cast<Son*>(t_pFarther);
	t_Son->Func2();
	return 0;
}